<!doctype html>
<html class="no-js">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>干部任免审批表</title>
	<meta name="description" content="">
	<meta name="keywords" content="">
	<script type="text/javascript">
		var phoneScale = parseInt(window.screen.width) / 1000;
		document.write('<meta name="viewport" content="width=device-width,initial-scale=1 minimum-scale = 1, maximum-scale = 3, user-scalable=yes">')
	</script>

	<!--[if (gte IE 9)|!(IE)]><!-->
	<script src="js/jquery.min.js"></script>
	<!--<![endif]-->
	<script src="js/amazeui.min.js"></script>
	<script type="text/javascript" src="./skins/js/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="./skins/js/jquery-ui.min.js"></script>
	<script type="text/javascript" src="./skins/js/jcarousellite_1.0.1.min.js"></script>
	<script type="text/javascript" src="./skins/js/slide_change.js"></script>
	<script type="text/javascript" src="./script/doT.min.js"></script>

	<script type="text/javascript" src="./script/api.js"></script>
	<!-- css -->
	<link rel="stylesheet" href="css/amazeui.min.css">
	<link rel="stylesheet" href="css/app.css">
	<!-- <link href="./css/style.css" rel="stylesheet" type="text/css" /> -->
	<link rel="stylesheet" href="css/style.css">

</head>

<body>

	<h2 class="gbrm-t">干部任免审批表</h2>
	<div style="padding:0 5px;">
		<table class="gbrm" cellspacing="0" cellpadding="0" align="center">
			<h2></h2>
			<tr>
				<td width="11%">姓&nbsp;&nbsp;&nbsp;名</td>
				<td width="13%" id='I01'>XXX</td>
				<td width="11%">性别</td>
				<td width="14%" id='I02'>男</td>
				<td width="12.5">出生年月
					<p>(&nbsp;&nbsp;&nbsp;岁)</p>
				</td>
				<td width="13%" id='I03'>1958.12
					<p>(59岁)</p>
				</td>
				<td width="24.46%" rowspan="4"><img id="img" src="file:///storage/emulated/0/ader/pic/{{=value.ID}}.jpg" /></td>
			</tr>
			<tr>
				<td>民&nbsp;&nbsp;&nbsp;族</td>
				<td id='I04'>汉族</td>
				<td>籍&nbsp;&nbsp;&nbsp;贯</td>
				<td id='I05'>湖南
					<p>汉寿</p>
				</td>
				<td>出&nbsp;&nbsp;生&nbsp;&nbsp;地</td>
				<td id='I06'>黑龙江
					<p>佳木斯</p>
				</td>
			</tr>
			<tr>
				<td>入党时间</td>
				<td id='I07'>1989.06</td>
				<td>参加工
					<p>作时间</p>
				</td>
				<td id='I08'>1977.08</td>
				<td>健康状况</td>
				<td id='I09'>健康</td>
			</tr>
			<tr>
				<td>专业技
					<p>术职务</p>
				</td>
				<td colspan="2" id='I10'></td>
				<td>熟悉专业
					<p>有何特长</p>
				</td>
				<td colspan="2" id='I11'></td>
			</tr>
			<tr>
				<td rowspan="2">学&nbsp;&nbsp;&nbsp;历
					<p>学&nbsp;&nbsp;&nbsp;位</p>
				</td>
				<td>全日制
					<p>教&nbsp;&nbsp;&nbsp;育</p>
				</td>
				<td colspan="2" id='I12'>中专</td>
				<td>毕业院校
					<p>系及专业</p>
				</td>
				<td colspan="2" id='I13'>湘潭机电专科学校物资管理专业</td>
			</tr>
			<tr>
				<td>在&nbsp;&nbsp;&nbsp;职
					<p>教&nbsp;&nbsp;&nbsp;育</p>
				</td>
				<td colspan="2" id='I14'>大专
					<p>农业推广硕士</p>
				</td>
				<td>毕业院校
					<p>系及专业</p>
				</td>
				<td colspan="2" id='I15'>黑龙江商学院统计专业
					<p>东北林业大学农业与区域发展</p>
				</td>
			</tr>
			<tr>
				<td colspan="2">现&nbsp;&nbsp;&nbsp;任&nbsp;&nbsp;&nbsp;职&nbsp;&nbsp;&nbsp;务</td>
				<td colspan="5" id='I16'></td>
			</tr>
			<tr>
				<td colspan="2">拟&nbsp;&nbsp;&nbsp;任&nbsp;&nbsp;&nbsp;职&nbsp;&nbsp;&nbsp;务</td>
				<td colspan="5" id='I17'></td>
			</tr>
			<tr>
				<td colspan="2">任&nbsp;&nbsp;&nbsp;免&nbsp;&nbsp;&nbsp;职&nbsp;&nbsp;&nbsp;务</td>
				<td colspan="5" id='I18'></td>
			</tr>
			<tr>
				<td>简
					<p style="padding-top:30px">历</p>
				</td>
				<td colspan="6" style="height:200px; text-align:left;" valign="top">
					<p>1977.08-1980.08 佳木斯市郊区知青</p>
				</td>
			</tr>
			<tr>
				<td style="height:160px; padding:5px 0;">奖<br>励<br>情<br>况</td>
				<td colspan="6" style="text-align:left;" id='I19'></td>
			</tr>
			<tr>
				<td style="height:100px;">年度考
					<p>核结果</p>
				</td>
				<td colspan="6" style="text-align:left;" id='I20'></td>
			</tr>
			<tr>
				<td style="height:100px; padding:5px 0;">任<br>免<br>理<br>由</td>
				<td colspan="6" style="text-align:left;" id='I21'></td>
			</tr>
		</table>
		<div id="list">
		</div>
		<script type='text/template' id='template'>
			<table class="gbrm" cellspacing="0" cellpadding="0" align="center" style="border-top:0;">
				<tr>
					<td rowspan="8" style="width:11%; padding:5px 0;">主<br>要<br>家<br>庭<br>成<br>员<br>及<br>重<br>要<br>社<br>会<br>关<br>系</td>
					<td style="width:10%">称谓</td>
					<td style="width:10%">姓名</td>
					<td style="width:10%">出生年月</td>
					<td style="width:10%">政治面貌</td>
					<td colspan="2">工作单位及职务</td>
				</tr>



				<!-- <td colspan="2" style="text-align:left;">佳木斯市向阳区妇幼保健计划生育服务中心科员</td> -->
				{{~it :value:index}}
				<tr>
					<td>{{=value.a}}</td>
					<td>{{=value.b}}</td>
					<td>{{=value.c}}</td>
					<td>{{=value.d}}</td>
					<td>{{=value.e}}</td>
				</tr>
				{{~}}
			</table>
		</script>
		<table class="gbrm" cellspacing="0" cellpadding="0" align="center" style="border-top:0">
			<tr>
				<td style="width:11%; height:100px; padding:5px 0;">呈<br>报<br>单<br>位</td>
				<td colspan="6" style="text-align:left;">

					<div class="gbrm-s">
						(盖&nbsp;&nbsp;&nbsp;章)
						<p>
							年<span></span>月<span></span>日
						</p>
					</div>
				</td>
			</tr>
			<tr>
				<td style="width:11%; height:100px;">审批<br>机关<br>意见</td>
				<td>

					<div class="gbrm-s">
						(盖&nbsp;&nbsp;&nbsp;章)
						<p>
							年<span></span>月<span></span>日
						</p>
					</div>
				</td>
				<td style="width:11%; height:100px;">行政<br>机关<br>任免<br>意见</td>
				<td>

					<div class="gbrm-s">
						(盖&nbsp;&nbsp;&nbsp;章)
						<p>
							年<span></span>月<span></span>日
						</p>
					</div>
				</td>
			</tr>
		</table>
		<div class="gbrm-d">填表人：</div>
	</div>

</body>

</html>

<script type="text/javascript">
var a;
	function isHeng() {
		if (window.orientation == 180 || window.orientation == 0) {
		    //  alert("竖屏状态！")
				a = 'shu';
		}
		if (window.orientation == 90 || window.orientation == -90) {
		    //  alert("横屏状态！")
				a = 'heng';
		}
   return a;
	}


	apiready = function() {
		$api.setStorage('isJianli', 1);
		var x = 	isHeng();
		api.addEventListener({
			name: 'keyback'
		}, function(ret, err) {
			$api.setStorage('isJianli', 0);
		var y = 	isHeng();
		if (x==y) {
			api.closeWin();
		}else {
			api.execScript({
				name: 'index',
				script: 'jianlireload();'
			});
		}
		});


		var id = api.pageParam.id;
		var db = api.require('db');
		var sql = 'SELECT * FROM base_info,base_family WHERE base_info.id =' + id + ' AND base_info.ID = base_family.PID';
		db.selectSql({
			name: 'data',
			sql: sql
		}, function(ret, err) {
			if (ret.status) {
				var dataPage = ret.data;
				for (var i = 1; i < 22; i++) {
					if (i < 10) {

						var t = 'I0' + i;
						var temp = dataPage[0][t];
						temp = temp.replace(/[\r\n]/g, "<p>");
						temp = temp + '</p>';
						if (i == 3) {
							temp = temp.substring(0, 7);
							var date = new Date(temp);
							var age = new Date().getFullYear() - date.getFullYear();
							temp = temp + ' <br> (' + age + ')';
						}

						$("#I0" + i).html(temp);
					} else {
						var t = 'I' + i;
						var temp = dataPage[0][t].replace(/\\r\\n/g, "<p>");
						temp = temp.replace(/\\r/g, "</p>");
						$("#I" + i).html(temp);
					}
				}


				var tempImg = ret.data[0].PID;
				var src = 'file:///storage/emulated/0/ader/pic/' + tempImg + '.jpg'

				$("img").attr("src", src);
				var dotFn = doT.template(template.innerHTML);
				var html = dotFn(ret.data);
				var list = $api.byId('list');
				$api.html(list, html);

			} else {
				alert(JSON.stringify(err));
			}
		});
	}
</script>
